﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using System.Data;
using DTO;

namespace BUS
{
    public static class MailInfoBUS
    {
        public static DataTable getMailInfoById(int id)
        {
            return MailInfoDAO.getMailInfoById(id);
        }
        public static bool updateMailInfo(MailInfoDTO mail)
        {
            return MailInfoDAO.updateMailInfo(mail);
        }
        public static bool insertMailInfo(MailInfoDTO mail)
        {
            return MailInfoDAO.insertMailInfo(mail);
        }
        public static DataTable getUserMailInfo(int userid)
        {
            return MailInfoDAO.getUserMailInfo(userid);
        }
        public static bool updateMailPass(string pass, int userId)
        {
            return MailInfoDAO.updateMailPass(pass, userId);
        }
        public static DataTable getMailInfoByMailAddress(string mail)
        {
            return MailInfoDAO.getMailInfoByMailAddress(mail);
        }
        public static bool deleteMailinfo(int id)
        {
            return MailInfoDAO.deleteMailInfo(id);
        }

    }
}
